<template>
  <div style="background-color:#FDFDFDFF">
    <div class="search-title">
      <van-icon name="arrow-left" color="#D8D8D8FF" @click="$router.back(-1)" />
      <van-search placeholder="请输入搜索关键词" v-model="value" @search="onSearch" />
      <van-tag round color="#C30C22FF" size="large" @click="onSearch">搜索</van-tag>
    </div>
    <div class="search-history">
      <van-row type="flex" justify="space-between">
        <van-col span="12">
          <h2>历史搜索</h2>
        </van-col>
        <van-col span="12">
          <van-icon name="delete" style="float:right;color:#555555FF" />
        </van-col>
      </van-row>
      <div class="history-content">
        <van-tag color="#C30C22FF" plain round size="large" v-for="(item,i) in 10" :key="i">韩国潮流</van-tag>
      </div>
    </div>
    <div class="search-history">
      <van-row type="flex" justify="space-between">
        <van-col span="12">
          <h2>热门推荐</h2>
        </van-col>
        <van-col span="12">
          <van-icon name="delete" style="float:right;color:#555555FF" />
        </van-col>
      </van-row>
      <div class="history-content">
        <van-tag color="#C30C22FF" plain round size="large" v-for="(item,i) in 10" :key="i">韩国潮流</van-tag>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      value: ""
    };
  },
  created() {
    this.$store.commit("hideLoading");
  },

  methods: {
    onSearch() {
      this.$router.push({ path: "/searchList" });
      this.$store.commit("showLoading");
    }
  }
};
</script>

<style lang='less' scoped>
.search-title {
  display: flex;
  align-items: center;
  width: 100%;
  height: 78px;
  padding: 20px;
  border-bottom: 1px solid #dfdfdf80;
}
.search-history {
  margin-top: 10px;
  width: 100%;
  height: 280px;
  box-shadow: 0px -5px 5px 3px #f0f0f0ff;
  padding: 15px;
  .history-content {
    display: flex;
    flex-wrap: wrap;
  }
}
h2 {
  font-size: 18px;
}
/deep/.van-icon-arrow-left {
  font-size: 18px;
}
/deep/.van-search {
  width: 263px;
  height: 36px;
  padding: 0;
  margin-right: 12px;
  font-weight: 700;
  color: #000000ff;
}
/deep/.van-hairline--surround {
  margin-bottom: 14px;
  margin-right: 12px;
}
/deep/ .van-icon-delete {
  font-size: 20px;
}
</style>